package ord2.notifier;

import ord2.core.Result;

/**
 * This interface is used to notify a user that was registred in system.
 * A notification is send to notifier with a colletion of results and a
 * user identifier that is the addressee.
 * @param N type of object that is used to specifies destination
 * @param T type of carried result
 * @see ParametricNotifier
 *
 * @author José Ivan
 * @author Edviges
 *
 */
public interface Notifier<N, T> {

    /**
     * This method ise called when a notification must be done.
     * @param to Addressee identifier
     * @param res Array contaning search result that must be notified
     * @return true on sucess or false otherwise
     */
    boolean notify(N to, Result<T>[] res);
}
